Skip to content

Conversation

@DustyShoe
Copy link
Contributor

@DustyShoe DustyShoe commented Jan 10, 2026

Summary

Feature that adds a higher level of resampling for Transform operation.
Added Bilinear, Bicubic, Hamming and Lanczos smoothing algorithms.
New options provide a smoother, less jagged images when layer is resized up or down.

This feature is integrated in currently used transform menu with toggle switch to enable/disable smoothing.
Options can be selected from dropdown menu:
image
Images for comparison:
Shrinking the image (The biggest benefit)
image

Also provides smoother results when upscaling the image.

image

Related Issues / Discussions

Closes:
#8004

QA Instructions

  • Open canvas, add a raster layer with visible edges (e.g., a sharp-edged shape or text).
  • Enter transform mode, scale up/down with smoothing OFF; apply transform; confirm edges look aliased/nearest-like.
  • Enable smoothing toggle; pick each mode (bilinear, bicubic, hamming, lanczos), apply transform, and visually compare edge softness and ringing—expect subtle differences, with lanczos typically sharpest and bilinear softest.
  • Toggle smoothing OFF after it was ON; confirm it returns to baseline behavior.
  • Verify the smoothing mode selector is disabled when smoothing is OFF and preserves last selection when re-enabled.
  • Try both upscale and downscale; confirm smoothing affects both.

Merge Plan

  • Low conflict risk overall, but CanvasEntityTransformer.ts and util.ts are active files—worth rebasing/merging latest main right before merge to avoid drift.
  • No backend changes needed; the img_resize invocation already supports resample_mode, so the frontend change is sufficient.
  • Only en.json updated; if your process expects other locales, note that this is normal for UI-only strings but translation updates may come later.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added the frontend PRs that change frontend files label Jan 10, 2026
@DustyShoe DustyShoe changed the title Feat(UI)/canvas/high level transform smoothing Feat(UI): Canvas high level transform smoothing Jan 10, 2026
Copy link
Collaborator

@Pfannkuchensack Pfannkuchensack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works fine.

Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as advertised.

@lstein lstein merged commit 5c00684 into invoke-ai:main Jan 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants